/* 全局声明 */
* {
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
}

html {
    font-size: 100px;
}

body {
    font-size: 16px;
    font-family: "Segoe UI", "Lucida Grande", Helvetica, Arial, "Microsoft YaHei", FreeSans, Arimo, "Droid Sans", "wenquanyi micro hei", "Hiragino Sans GB", "Hiragino Sans GB W3", Arial, sans-serif;
    background: #2c3242 url("../images/H5-BG.jpg") no-repeat center fixed;
    background-size: 100% 100%;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

a {
    color: #fff;
    text-decoration: none;
}

/* 通用类 */
.anim {
    -webkit-transition: 1s left linear;
    transition: 1s left linear;
}
.animated {
    -webkit-animation-duration: .4s;
    animation-duration: .4s;
}

@import "button.scss";

/* pacman game 部分 */
body {

}


.gameContainer {
    height: 60%;
    padding: 3.5% 6.6667% 0;
    overflow: auto;
}

.map {
    position: relative;
    width: 100%;
    margin-bottom: .4rem;
    .gift {
        position: absolute;
        top: 0;
        width: 20%;
        border-radius: .05rem;
        min-height: .1rem;
        background-repeat: no-repeat;
        background-position: center;
        background-color: rgba(255, 255, 255, 1);
        background-size: cover;
        box-shadow: /*inset 0 0 .1rem rgba(255, 255, 255, .8),*/ 0 0 .2rem rgba(0, 0, 0, .6);
        -webkit-transform: scale(.8);
        transform: scale(.85);
        opacity: 1;
        &:before {
            content: '';
            position: absolute;
            bottom: -.08rem;
            left: 50%;
            width: 0;
            height: 0;
            margin-left: -.04rem;
            border: .04rem solid transparent;
            border-top-color: rgba(255, 255, 255, .9);
        }
        &:after {
            content: '';
            display: block;
            clear: both;
            padding-top: 100%;
        }
        &.active {
            -webkit-transition: all .8s ease-out;
            transition: all .8s ease-out;
            -webkit-transform: rotate(-375deg) scale(1.2);
            transform: scale(1.4) rotateZ(-370deg);
            z-index: 1;
            box-shadow: 0 0 .8rem rgba(0, 0, 0, .8);
            opacity: 1;
        }
        &.active:before {
            opacity: 0;
        }
    }
    @for $i from 0 to 31 {
        .gift#{$i+1} {
            left: 20% * ($i%5);
        }
    }
    .pathContainer {
        padding-top: 14.5%;
        .path,
        .node {
            opacity: .4;
        }
        .path {
            width: 100%;
            height: 1px;
            margin: .3rem auto .15rem;

            /* Permalink - use to edit and share this gradient: http://colorzilla.com/gradient-editor/#202532+0,40d4cd+10,40d4cd+50,40d4cd+90,202532+100&amp;0+0,1+10,1+50,1+90,0+100 */

            background: -moz-linear-gradient(left, rgba(32, 37, 50, 0) 0%, rgba(64, 212, 205, 1) 10%, rgba(64, 212, 205, 1) 50%, rgba(64, 212, 205, 1) 90%, rgba(32, 37, 50, 0) 100%);
            /* FF3.6+ */

            background: -webkit-gradient(linear, left top, right top, color-stop(0%, rgba(32, 37, 50, 0)), color-stop(10%, rgba(64, 212, 205, 1)), color-stop(50%, rgba(64, 212, 205, 1)), color-stop(90%, rgba(64, 212, 205, 1)), color-stop(100%, rgba(32, 37, 50, 0)));
            /* Chrome,Safari4+ */

            background: -webkit-linear-gradient(left, rgba(32, 37, 50, 0) 0%, rgba(64, 212, 205, 1) 10%, rgba(64, 212, 205, 1) 50%, rgba(64, 212, 205, 1) 90%, rgba(32, 37, 50, 0) 100%);
            /* Chrome10+,Safari5.1+ */

            background: -ms-linear-gradient(left, rgba(32, 37, 50, 0) 0%, rgba(64, 212, 205, 1) 10%, rgba(64, 212, 205, 1) 50%, rgba(64, 212, 205, 1) 90%, rgba(32, 37, 50, 0) 100%);
            /* IE10+ */

            background: linear-gradient(to right, rgba(32, 37, 50, 0) 0%, rgba(64, 212, 205, 1) 10%, rgba(64, 212, 205, 1) 50%, rgba(64, 212, 205, 1) 90%, rgba(32, 37, 50, 0) 100%);
            /* W3C */
        }
        .node {
            position: absolute;
            bottom: -.02rem;
            width: .05rem;
            height: .05rem;
            margin-left: -.02rem;
            border-radius: 50%;
            background: #40d4cd;
        }
        .node1 {
            left: 10%;
        }
        .node2 {
            left: 30%;
        }
        .node3 {
            left: 50%;
        }
        .node4 {
            left: 70%;
        }
        .node5 {
            left: 90%;
        }
    }

    .character {
        position: absolute;
        left: 0;
        bottom: 0;
        margin-left: -.15rem;
        margin-bottom: -0.15rem;
        -webkit-transform: scale(.5);
        -moz-transform: scale(.5);
        -ms-transform: scale(.5);
        -o-transform: scale(.5);
        transform: scale(.5);
        .pacman {
            position: relative;
            width: 30px;
            height: 30px;
            .forehead,
            .head,
            .jaw {
                position: absolute;
                top: 0;
                left: 0;
                width: 100%;
                height: 50%;
                overflow: hidden;
                -webkit-transform-origin: center bottom;
                transform-origin: center bottom;
            }
            .forehead:before {
                content: '';
                position: absolute;
                top: 40%;
                left: 60%;
                width: 2px;
                height: 4px;
                background-color: rgba(0, 0, 0, .8);
                z-index: 1;
            }
            .forehead:after,
            .head:after,
            .jaw:after {
                content: '';
                position: absolute;
                top: 0;
                left: 0;
                width: 100%;
                height: 200%;
                border-radius: 50%;
                background: rgba(247, 197, 40, 1);
            }
            .forehead {
                -webkit-transform: rotate(-60deg);
                transform: rotate(-60deg);
                /*background:rgba(255,0,0,.2);*/
            }
            .head {
                -webkit-transform: rotate(-90deg);
                transform: rotate(-90deg);
                /*background:rgba(0,255,0,.2);*/
            }
            .jaw {
                -webkit-transform: rotate(-120deg);
                transform: rotate(-120deg);
                /*background:rgba(0,0,255,.2);*/
            }
            .forehead-animation {
                -webkit-animation: forehead-animation .4s steps(1, start) infinite;
                animation: forehead-animation .5s steps(1, start) infinite;
            }
            .jaw-animation {
                -webkit-animation: jaw-animation .4s steps(1, start) infinite;
                animation: jaw-animation .5s steps(1, start) infinite;
            }
        }
        .pacman-frontface {
            display: none;
            width: .3rem;
            height: .3rem;
            background: url("../images/frontface.png") no-repeat;
            background-size: contain;
        }

        @-webkit-keyframes forehead-animation {
            /* open */
            0% {
                -webkit-transform: rotate(-60deg);
            }
            /* closed */
            50% {
                -webkit-transform: rotate(-0deg);
            }
            /* open */
            100% {
                -webkit-transform: rotate(-60deg);
            }
        }

        @keyframes forehead-animation {
            /* open */
            0% {
                transform: rotate(-60deg);
            }
            /* closed */
            50% {
                transform: rotate(-0deg);
            }
            /* open */
            100% {
                transform: rotate(-60deg);
            }
        }

        @-webkit-keyframes jaw-animation {
            /* open */
            0% {
                -webkit-transform: rotate(-120deg);
            }
            /* close */
            50% {
                -webkit-transform: rotate(-180deg);
            }
            /* open */
            100% {
                -webkit-transform: rotate(-120deg);
            }
        }

        @keyframes jaw-animation {
            /* open */
            0% {
                transform: rotate(-120deg);
            }
            /* close */
            50% {
                transform: rotate(-180deg);
            }
            /* open */
            100% {
                transform: rotate(-120deg);
            }
        }

    }
}

.step0 .character {
    left: -20%;
}

@for $i from 1 to 31 {
    .step#{$i} .character {
        left: 20% * ($i % 5 - 1) + 10%;
    }
}

/* 其他 */
button {
    border: 0 none;
    background: #000;
    color: #eee;
    font-size: .3rem;
}

.numberContainer {
    position: absolute;
    width: 100%;
    .num {
        position: absolute;
        top: -.05rem;
        width: 20%;
        text-align: center;
        color: rgba(255, 255, 255, 1);
        font-size: .14rem;
        &:after {
            content: '';
            padding-top: 100%;
        }
    }
    @for $i from 0 to 31 {
        .num#{$i+1} {
            left: 20% * ($i%5);
        }
    }
}

/* 礼物盒弹窗 */
.giftContainer {
    position: fixed;
    top: 2%;
    z-index: 100;
    min-height: 2.1rem;
    margin: 0 3%;
    text-align: center;
    color: #555;
    opacity: 0;
    -webkit-transform: translate3d(0, -100%, 0);
    transform: translate3d(0, -100%, 0);
    .giftBox {
        background-color: rgba(255, 255, 255, 1);
        -webkit-border-radius: .04rem .04rem 0 0;
        -moz-border-radius: .04rem .04rem 0 0;
        border-radius: .04rem .04rem 0 0;
        box-shadow: 0 -.2rem .1rem rgba(0, 0, 0, .5);
        .wrapper {
            overflow: hidden;
            .giftTitle {
                margin: 0;
                padding: .15rem 0;
                font-size: .17rem;
                line-height: 1;
                font-weight: normal;
                color: #3c3242;
            }
            .giftPhoto {
                margin: 0 auto;
                width: 1.23rem;
                height: 1.23rem;
                background: no-repeat center;
                background-size: cover;
            }
            .giftName {
                padding: .15rem 0;
                font-size: .17rem;
                line-height: 1;
                color: #3c3242;
            }
            .giftDesc {
                max-height: 4.5em;
                overflow: hidden;
                font-size: .16rem;
                padding: 0 .1rem 0;
                margin-bottom: .05rem;
                text-indent: 2em;
                text-align: left;
                line-height: 1.5;
                color: #484848;
                word-break: break-all;
            }
        }
    }

    .split {
        position: relative;
        overflow: hidden;
        opacity: 1;
        .bg {
            overflow: hidden;
            height: .095rem;
            margin: 0 .045rem;
            background-color: rgba(255, 255, 255, 1);
        }
        .dash {
            margin: .044rem 0;
            border: 0 none;
            border-top: 1px dashed rgba(0, 0, 0, .62);
        }
        &:before,
        &:after {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: .045rem;
            height: .095rem;
            background: url('../images/semi-circle.png') no-repeat center;
            background-size: 100%;
        }
        &:after {
            left: auto;
            right: 0;
            -webkit-transform: rotate(180deg);
            -moz-transform: rotate(180deg);
            -ms-transform: rotate(180deg);
            -o-transform: rotate(180deg);
            transform: rotate(180deg);
        }
    }

    .redeemCode {
        position: relative;
        padding: .12rem 0;
        min-height: .2rem;
        font-size: .19rem;
        line-height: .2rem;
        background-color: rgba(255, 255, 255, 1);
        color: #2c3242;
        &:after {
            content: '';
            position: absolute;
            left: 0;
            bottom: -12px;
            width: 100%;
            height: 12px;
            background: url("../images/jag.png") repeat-x left top;
            background-size: 2%;
            opacity: 1;
        }
        .noCode {

        }
        .codeGet {
            display: none;
            .name {
                margin-right: .2em;
            }
            .code {
                letter-spacing: .2em;
            }
        }
    }
}

/* 领取礼物表单 */
.formContainer {
    position: fixed;
    bottom: 0;
    z-index: 200;
    width: 100%;
    height: 2.1rem;
    padding: 0 4%;
    text-align: center;
    color: #fff;
    /*background-color: rgba(0, 0, 0, .9);
    box-shadow: 0 0 10px rgba(0, 0, 0, .5);*/
    opacity: 0;
    -webkit-transform: translate3d(0, 100%, 0);
    transform: translate3d(0, 100%, 0);
    p {
        font-size: .18rem;
        font-weight: bold;
    }
    .userInput {
        padding: .15rem 0 .25rem;
        & input {
            width: 47%;
            border: 0 none;
            background: #fff;
            color: #555;
            padding: .1rem;
            font-size: .16rem;
            text-align: center;
            font-family: "Segoe UI", "Lucida Grande", Helvetica, Arial, "Microsoft YaHei", FreeSans, Arimo, "Droid Sans", "wenquanyi micro hei", "Hiragino Sans GB", "Hiragino Sans GB W3", Arial, sans-serif;
            -webkit-border-radius: .04rem;
            -moz-border-radius: .04rem;
            border-radius: .04rem;
            outline: none;
        }
        & input::-webkit-outer-spin-button,
        & input::-webkit-inner-spin-button {
            -webkit-appearance: none;
        }
        & input::-webkit-input-placeholder {
            text-align: center;
            color: #6e6e6e;
        }
        .userName {
            margin-right: 2%;
        }
        .userMobile {
            margin-left: 2%;
        }

    }
    .formGetGift {
        display: none;
    }
    .formRate {
        display: none;
        .button {
            margin: .2rem .1rem 0;
        }
    }
}